import {
	PropType,
	inject
} from 'vue';
import { KuiBadgeProps } from './type';
import { configProviderInjectionKey } from '../kui-config-provider/type';

export default {
	/**
	 * @zh 页面模式
	 */
	mode: {
		type: String as PropType<KuiBadgeProps['mode']>,
		default: () =>
			inject(configProviderInjectionKey, undefined)?.mode ?? 'light'
	},
	/**
	 * @zh 徽标类型
	 */
	type: {
		type: String as PropType<KuiBadgeProps['type']>,
		default: '' as KuiBadgeProps['type']
	},
	/**
	 * @zh 原点徽标
	 */
	dot: {
		type: Boolean,
		default: false
	},
	/**
	 * @zh 徽标内容
	 */
	value: {
		type: String,
		default: '0'
	},
	/**
	 * @zh 最大值
	 */
	max: {
		type: Number,
		default: 0
	},
	/**
	 * @zh 徽标颜色
	 */
	color: {
		type: String,
		default: ''
	},
	/**
	 * @zh 徽标显示状态
	 */
	show: {
		type: Boolean,
		default: true
	},
	/**
	 * @zh 徽标图标
	 */
	icon: {
		type: String,
		default: ''
	},
	/**
	 * @zh 徽标位置
	 */
	position: {
		type: String as PropType<KuiBadgeProps['position']>,
		default: '' as KuiBadgeProps['position']
	},
	/**
	 * @zh 渐变主题徽标
	 */
	gradient: {
		type: Boolean,
		default: false
	}
}